import type * as icons from '@blocksuite/icons/rc';

// assume all exports in icons are icon Components
type LibIconComponentName = keyof typeof icons;

type fromLibIconName<T extends string> = T extends `${infer N}Icon`
  ? Uncapitalize<N>
  : never;

export const WorkspacePropertyIconNames = [
  'ai',
  'email',
  'text',
  'dateTime',
  'keyboard',
  'pen',
  'account',
  'embedWeb',
  'layer',
  'pin',
  'appearance',
  'eraser',
  'layout',
  'presentation',
  'bookmark',
  'exportToHtml',
  'lightMode',
  'progress',
  'bulletedList',
  'exportToMarkdown',
  'link',
  'publish',
  'camera',
  'exportToPdf',
  'linkedEdgeless',
  'quote',
  'checkBoxCheckLinear',
  'exportToPng',
  'linkedPage',
  'save',
  'cloudWorkspace',
  'exportToSvg',
  'localData',
  'shape',
  'code',
  'favorite',
  'localWorkspace',
  'style',
  'codeBlock',
  'file',
  'lock',
  'tag',
  'collaboration',
  'folder',
  'multiSelect',
  'tags',
  'colorPicker',
  'frame',
  'new',
  'today',
  'contactWithUs',
  'grid',
  'now',
  'upgrade',
  'darkMode',
  'grouping',
  'number',
  'userGuide',
  'databaseKanbanView',
  'image',
  'numberedList',
  'view',
  'databaseListView',
  'inbox',
  'other',
  'viewLayers',
  'databaseTableView',
  'info',
  'page',
  'attachment',
  'delete',
  'issue',
  'paste',
  'heartbreak',
  'edgeless',
  'journal',
  'payment',
  'member',
] as const satisfies fromLibIconName<LibIconComponentName>[];

export type WorkspacePropertyIconName =
  (typeof WorkspacePropertyIconNames)[number];
